package com.greystripe.sdk;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.webkit.JavascriptInterface;

final class bh
{
  private static bh b;
  private Context a;

  private bh()
  {
  }

  private bh(Context paramContext)
  {
    this.a = paramContext;
  }

  public static bh a(Context paramContext)
  {
    try
    {
      if (b == null)
        b = new bh(paramContext);
      bh localbh = b;
      return localbh;
    }
    finally
    {
    }
  }

  private bi c()
  {
    NetworkInfo localNetworkInfo = ((ConnectivityManager)this.a.getSystemService("connectivity")).getActiveNetworkInfo();
    if ((localNetworkInfo == null) || (!localNetworkInfo.isConnected()))
      return bi.OFFLINE;
    if (localNetworkInfo.getType() == 0)
      return bi.CELLULAR;
    return bi.WIFI;
  }

  @JavascriptInterface
  public final boolean a()
  {
    return c() != bi.OFFLINE;
  }

  @JavascriptInterface
  public final boolean b()
  {
    return c() == bi.WIFI;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.greystripe.sdk.bh
 * JD-Core Version:    0.6.2
 */